#include <xp/bas/stdio.h>
#include <xp/bas/stdlib.h>

int xp_main (int argc, xp_char_t* argv[])
{
	long value;
	xp_char_t* endptr;

	if (argc != 2) {
		xp_printf (XP_TEXT("usage: %ls <number>\n"), argv[0]);
		return -1;
	}

	XP_STRTOI (value, argv[1], &endptr, 10);
	xp_printf (XP_TEXT("[%ls] -> [%d], endptr = [%ls]\n"), argv[1], value, endptr);
	return 0;
}
